home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / Development / PowerD / alpha / modules / resources / disk.m < prev    next >
Encoding:
Text File  |  2002-10-28  |  1.9 KB  |  74 lines

  1. MODULE 'exec/ports'
  2. MODULE 'exec/interrupts'
  3. MODULE 'exec/libraries'
  4.  
  5. /********************************************************************
  6. *
  7. * Resource structures
  8. *
  9. ********************************************************************/
  10.  
  11. OBJECT DiscResourceUnit
  12.  Message:Message,
  13.  DiscBlock:Interrupt,
  14.  DiscSync:Interrupt,
  15.  Index:Interrupt
  16.  
  17. OBJECT DiscResource
  18.  Library:Library,
  19.  Current:PTR TO DiscResourceUnit,
  20.  Flags:UBYTE,
  21.  pad:UBYTE,
  22.  SysLib:PTR TO Library,
  23.  CiaResource:PTR TO Library,
  24.  UnitID[4]:ULONG,
  25.  Waiting:List,
  26.  DiscBlock:Interrupt,
  27.  DiscSync:Interrupt,
  28.  Index:Interrupt,
  29.  CurrTask:PTR TO Task
  30.  
  31. /* dr_Flags entries */
  32. FLAG DR_ALLOC0,  /* unit zero is allocated */
  33.  DR_ALLOC1,  /* unit one is allocated */
  34.  DR_ALLOC2,  /* unit two is allocated */
  35.  DR_ALLOC3,  /* unit three is allocated */
  36.  DR_ACTIVE   /* is the disc currently busy? */
  37.  
  38. /********************************************************************
  39. *
  40. * Hardware Magic
  41. *
  42. ********************************************************************/
  43. CONST DSKDMAOFF=$4000    /* idle command for dsklen register */
  44. /********************************************************************
  45. *
  46. * Resource specific commands
  47. *
  48. ********************************************************************/
  49. /*
  50.  * DISKNAME is a generic macro to get the name of the resource.
  51.  * This way if the name is ever changed you will pick up the
  52.  *  change automatically.
  53.  */
  54.  
  55. #define DISKNAME 'disk.resource'
  56.  
  57. CONST DR_ALLOCUNIT=LIB_BASE - 0*LIB_VECTSIZE,
  58.  DR_FREEUNIT=LIB_BASE - 1*LIB_VECTSIZE,
  59.  DR_GETUNIT=LIB_BASE - 2*LIB_VECTSIZE,
  60.  DR_GIVEUNIT=LIB_BASE - 3*LIB_VECTSIZE,
  61.  DR_GETUNITID=LIB_BASE - 4*LIB_VECTSIZE,
  62.  DR_READUNITID=LIB_BASE - 5*LIB_VECTSIZE,
  63.  DR_LASTCOMM=DR_READUNITID
  64.  
  65. /********************************************************************
  66. *
  67. * drive types
  68. *
  69. ********************************************************************/
  70. CONST DRT_AMIGA=$00000000,
  71.  DRT_37422D2S=$55555555,
  72.  DRT_EMPTY=$FFFFFFFF,
  73.  DRT_150RPM=$AAAAAAAA
  74.